<template>
  <div class="boxs">
    <div class="f2">
      <ul class="ul">
        <li>
          <el-form ref="ruleForm1" :model="form" label-width="250px" :rules="rules">
            <el-form-item label="项目名称" prop="a">
              <el-input v-model="form.a" @blur="a"></el-input>
            </el-form-item>
          </el-form>
          <el-form ref="ruleForm2" :model="form" label-width="250px" :rules="rules">
            <el-form-item label="期望使用保函额度" prop="b">
              <el-input
                v-model="addform.b"
                @focus="
                  () => {
                    this.addform.b = remoney(this.addform.b)
                  }
                "
                @input="limitInput($event, 'b')"
                @blur="b"
              ></el-input>
              <p style="position: absolute; right: 15px; top: 0px; z-index: 99; font-size: 16px">
                元
              </p>
              <p class="message" v-if="b1">格式错误，请重新输入</p>
            </el-form-item>
          </el-form>
        </li>
        <li>
          <el-form class="aaaaa" ref="ruleForm3" :model="form" label-width="250px" :rules="rules">
            <el-form-item label="合同签订时间" prop="c">
              <el-date-picker
                :clearable="false"
                v-model="form.c"
                type="date"
                placeholder=""
                value-format="yyyy-MM-dd"
                @blur="a"
              >
              </el-date-picker>
              <p style="position: absolute; right: 15px; top: 0px; z-index: 99; font-size: 16px">
                <img style="width: 0.1146rem" src="@/assets/shangpiao/日历.png" alt="" />
              </p>
            </el-form-item>
          </el-form>
          <el-form class="aaaaa" ref="ruleForm4" :model="form" label-width="250px" :rules="rules">
            <el-form-item label="期望使用保函时间" prop="d">
              <el-date-picker
                :clearable="false"
                v-model="form.d"
                type="date"
                placeholder=""
                value-format="yyyy-MM-dd"
                @blur="a"
              >
              </el-date-picker>
              <p style="position: absolute; right: 15px; top: 0px; z-index: 99; font-size: 16px">
                <img style="width: 0.1146rem" src="@/assets/shangpiao/日历.png" alt="" />
              </p>
            </el-form-item>
          </el-form>
        </li>
        <li>
          <el-form ref="ruleForm5" :model="form" label-width="250px" :rules="rules">
            <el-form-item label="合同金额" prop="e">
              <el-input
                v-model="addform.e"
                @focus="
                  () => {
                    this.addform.e = remoney(this.addform.e)
                  }
                "
                @input="limitInput($event, 'e')"
                @blur="e"
              ></el-input>
              <p style="position: absolute; right: 15px; top: 0px; z-index: 99; font-size: 16px">
                元
              </p>
              <p class="message" v-if="e1">格式错误，请重新输入</p>
            </el-form-item>
          </el-form>
          <el-form ref="ruleForm6" :model="form" label-width="250px" :rules="rules">
            <el-form-item label="期望使用保函期限" prop="f">
              <el-input v-model="form.f" @blur="f"></el-input>
              <p style="position: absolute; right: 15px; top: 0px; z-index: 99; font-size: 16px">
                月
              </p>
            </el-form-item>
          </el-form>
        </li>
      </ul>
      <!-- 合同上传 -->
      <div style="width: 6.25rem; margin: auto">
        <div class="title">
          <h6></h6>
          合同信息
        </div>
        <div class="f2_content">
          <div class="license1" style="">
            <!-- accept="image/png,image/jpg,image/JPG,image/PNG,image/jpeg" -->
            <el-upload
              multiple
              action="#"
              class="upload-demo"
              :auto-upload="false"
              :on-preview="handlePreview"
              :on-remove="handleRemove"
              :on-change="handleChangeBusiness"
              :http-request="uploadFileBusiness"
              :file-list="fileList"
              :limit="limit"
              list-type="picture"
            >
              <el-button size="small" type="primary">点击上传</el-button>
            </el-upload>
          </div>
          <div id="datatable" v-if="typeList.length != 0" style="margin-top: 0.1042rem">
            <el-table
              :data="typeList"
              border
              style="width: 100%"
              stripe
              :header-cell-style="{
                background: '#F1F5FF',
                color: '#4D4D4D'
              }"
            >
              <el-table-column label="序号" min-width="8%" align="center">
                <template slot-scope="scope">
                  <span>{{ scope.$index + 1 }}</span>
                </template>
              </el-table-column>
              <el-table-column prop="name" label="文件名称" align="center" min-width="50%">
                <template slot-scope="scope">
                  <span>{{ typeList[scope.$index].name.split('.')[0] }}</span>
                </template>
              </el-table-column>
              <el-table-column
                label="操作"
                align="center"
                class-name="small-padding fixed-width"
                min-width="20%"
              >
                <template slot-scope="scope">
                  <span class="span" @click="examine(scope.$index, typeList)">查看</span>
                  <span class="span span1" @click="del(scope.$index, typeList)">删除</span>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </div>
      </div>
      <!-- 服务协议 -->
      <div class="agreement">
        <img
          @click="submitBtn"
          :src="require(`@/assets/shangpiao/组${radio ? '38' : '39'}.png`)"
          alt=""
        />
        <span> 阅读并同意 </span>
        <a @click="submitBtn">《企业授权协议》、</a>
        <a @click="submitBtn">《技术服务协议》</a>
        <!-- <a
          href="https://operate.thunlink.cn/protocol/zbdcontract/企业授权协议.pdf"
          target="_blank"
          >《企业授权协议》</a
        > -->
      </div>
      <!-- 上一步/保存/提交 按钮 -->
      <div class="submit">
        <el-tooltip placement="top" v-if="!btn">
          <div slot="content">请勾选授权协议<br />确认填写的信息是否完整</div>
          <button
            class="btn btn3"
            v-bind:class="{
              active: btn & radio,
              actives: submitMessage == '提交中'
            }"
            @click="addKJApplys()"
          >
            {{ submitMessage }}
          </button>
        </el-tooltip>
        <button
          v-else
          class="btn btn3"
          v-bind:class="{
            active: btn & radio,
            actives: submitMessage == '提交中'
          }"
          @click="addKJApplys()"
        >
          {{ submitMessage }}
        </button>
      </div>
    </div>
    <!-- 弹窗 -->
    <!--签署协议弹窗开始 -->
    <el-dialog
      class="inviteAffirmClient"
      :closeOnClickModal="false"
      title=""
      :visible.sync="showAgreementVisible"
      width=""
    >
      <!-- 内容区域 -->
      <div class="dialog-center" v-loading="loading">
        <template>
          <el-tabs v-model="activeName">
            <el-tab-pane
              v-for="(item, index) in list"
              :key="index"
              :label="item.name"
              :name="item.names"
            >
              <div class="first">
                <iframe
                  style="border: none"
                  width="100%"
                  height="100%"
                  v-bind:src="item.url"
                ></iframe>
              </div>
            </el-tab-pane>
          </el-tabs>
        </template>
      </div>
      <!-- 按钮区域 -->
      <div slot="footer" class="dialog-footer">
        <button
          v-if="contractStatuss"
          :disabled="isLock"
          class="dialog-footer-bnt btn2"
          @click="aaaa"
        >
          确定
        </button>
        <button v-else :disabled="isLock" class="dialog-footer-bnt btn2" @click="sign">
          去签署
        </button>
      </div>
    </el-dialog>
    <!-- 签署协议弹窗结束 -->
    <!--签署协议提示开始 -->
    <el-dialog
      class="hint"
      :closeOnClickModal="false"
      title="合同签署"
      :visible.sync="hintVisible"
      width=""
    >
      <!-- 内容区域 -->
      <div class="dialog-center-hint">
        <p>
          签署短信已发送至经办人手机{{ operatetel | getPhone }}、法定代表人手机{{
            officertel | getPhone
          }}，请点击短信签署链接完成签署操作。
        </p>
      </div>
      <!-- 按钮区域 -->
      <div slot="footer" class="dialog-footer">
        <button
          style="background: #fff; color: #3f6ef2"
          class="dialog-footer-bnt btn2"
          @click="aaaa"
        >
          确定
        </button>
        <button
          v-bind:class="{ actives: submitMessage == '提交中' }"
          class="dialog-footer-bnt btn2"
          @click="addKJApplys()"
        >
          提交
        </button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { Contracts, Contract, createContractReview, updateapplyid, base } from '@/utils'
export default {
  data() {
    return {
      loading: false,
      contractStatuss: true, //合同签署状态
      isLock: false,
      activeName: 'first', //标签页默认
      showAgreementVisible: false, //协议弹框:
      hintVisible: false,
      officertel: '', //法人手机号
      operatetel: '', //经办人手机号
      list: null,
      fileList: [],
      limit: 99,
      typeList: [],
      submitMessage: '提交',
      radio: false, //企业授权服务状态变量
      btn: false, //提交按钮是否可用状态变量
      procedureId: '', // 从路由地址中获取产品ID,保存到状态变量中
      flowId: '',
      productcode: null,
      productname: null,
      ProductList: null,
      b1: false,
      e1: false,
      f1: false,
      form: {
        a: '',
        b: '',
        c: '',
        d: '',
        e: '',
        f: ''
      },
      // 用户填写资料表格
      addform: {
        a: '',
        b: '',
        c: '',
        d: '',
        e: '',
        f: ''
      },
      // 表单验证
      rules: {
        a: [{ required: true, message: ' ', trigger: 'blur' }],
        b: [{ required: true, message: ' ', trigger: 'blur' }],
        c: [{ required: true, message: ' ', trigger: 'blur' }],
        d: [{ required: true, message: ' ', trigger: 'blur' }],
        e: [{ required: true, message: ' ', trigger: 'blur' }],
        f: [{ required: true, message: ' ', trigger: 'blur' }]
      },
      // 合同签署数据
      contract: {
        applyid: '',
        entname: '',
        FRaccountid: '',
        inputdate: '',
        JBRaccountid: '',
        licenseno: '',
        mainindname: '',
        officer: '',
        officertel: '',
        ORGaccountid: '',
        productcode: '',
        radio: '',
        ticketadder: '',
        ticketbank: '',
        ticketbankno: '',
        tickethead: '',
        ticketno: '',
        tickettel: '',
        acceptor: '', //承兑人
        step: 'apply'
      }
    }
  },
  // 过滤器
  filters: {
    // 手机号脱敏
    getPhone: function (value) {
      if (!value) return value
      value = value.replace(/(\d{3})\d*(\d{4})/, '$1****$2')
      return value
    }
  },
  // 生命周期方法
  mounted() {
    // 从路由地址中获取产品ID, 保存到状态变量中;
    this.procedureId = localStorage.getItem('id')
    this.productcode = localStorage.getItem('productcode')
    this.productname = localStorage.getItem('productname')
    this.contract.productcode = localStorage.getItem('productcode')
  },
  methods: {
    // ------------------------签署合同开始------------------------
    // 点击去签署按钮
    async sign() {
      this.isLock = true
      setTimeout(() => {
        this.isLock = false
      }, 500)
      this.loading = true
      let data = await Contract(this.contract)
      if (data.code == 100) {
        this.loading = false
        this.radio = true
        this.showAgreementVisible = false
        this.hintVisible = true
        this.flowId = data.data.flowId
        this.submitBtns()
      }
    },
    // 签署协议提示确认键
    aaaa() {
      this.radio = true
      this.showAgreementVisible = false
      this.submitBtns()
      this.hintVisible = false
    },
    // 点击勾选协议按钮
    async submitBtn() {
      if (this.radio) return
      if (
        this.form.a == '' ||
        this.form.b == '' ||
        this.form.c == '' ||
        this.form.d == '' ||
        this.form.e == '' ||
        this.form.f == ''
      ) {
        return this.$Message.error('请填写信息')
      }
      let productcode = this.contract.productcode
      let parameter = {
        productcode: productcode,
        entname: sessionStorage.getItem('entname')
      }
      this.loading = true
      this.showAgreementVisible = true
      let data = await Contracts(parameter)
      if (data.code == 10000) {
        this.$Message.error('登录已过期，请重新登录')
        this.$router.push('/login')
        sessionStorage.clear()
        return
      }
      if (data.code != 100) {
        this.showAgreementVisible = false
        this.$Message.error('系统异常，请您稍后再试')
        this.loading = false
        return
      }
      this.officertel = data.data.ent.fincerttel
      this.operatetel = data.data.ent.operateTel
      this.contract.entname = data.data.ent.entname
      this.contract.FRaccountid = data.data.ent.fraccountid
      this.contract.inputdate = data.data.ent.inputdate
      this.contract.JBRaccountid = data.data.ent.jbRaccountid
      this.contract.licenseno = data.data.ent.licenseno
      this.contract.mainindname = data.data.ent.mainindname
      this.contract.officer = data.data.ent.operatename
      this.contract.officertel = data.data.ent.fincerttel
      this.contract.ORGaccountid = data.data.ent.qyaccountid
      data.data.coopeorg
        ? (this.contract.ticketbank = data.data.coopeorg.ticketbank)
        : (this.contract.ticketbank = '')
      data.data.coopeorg
        ? (this.contract.ticketbankno = data.data.coopeorg.ticketaccountno)
        : (this.contract.ticketbankno = '')
      data.data.coopeorg
        ? (this.contract.tickettel = data.data.coopeorg.tickettel)
        : (this.contract.tickettel = '')
      this.contract.radio = data.data.radio
      let GetcreateContractReview = await createContractReview(this.contract)
      if (GetcreateContractReview.code == 100) {
        this.contractStatuss = GetcreateContractReview.data.statuss
        if (this.contractStatuss) {
          this.list = GetcreateContractReview.data.data
          for (let i = 0; i < this.list.length; i++) {
            if (this.list[i].name == '企业授权协议.pdf') {
              this.list[i].name = this.list[i].name.split('.')[0]
              this.list[i].names = 'first'
            } else if (this.list[i].name == '技术服务协议.pdf') {
              this.list[i].name = this.list[i].name.split('.')[0]
              this.list[i].names = 'second'
            }
          }
          this.loading = false
        } else {
          this.list = GetcreateContractReview.data.data.file
          for (let i = 0; i < this.list.length; i++) {
            if (this.list[i].name == '企业授权协议.pdf') {
              this.list[i].name = this.list[i].name.split('.')[0]
              this.list[i].names = 'first'
            } else if (this.list[i].name == '技术服务协议.pdf') {
              this.list[i].name = this.list[i].name.split('.')[0]
              this.list[i].names = 'second'
            }
          }
          this.loading = false
        }
      } else {
        this.showAgreementVisible = false
        this.$Message.error('系统异常，请您稍后再试')
      }
      this.submitBtns()
    },
    // ------------------------签署合同结束------------------------
    // 表单
    a() {
      this.submitBtns()
    },
    b(e) {
      this.b1 = false
      this.form.b = this.addform.b
      //获取输入的数据，若不写这行，数据可能输不进去
      this.addform.b = e.target.value
      //将用户输入的数据，自动转换为带千分符的
      this.addform.b = this.fmoney(this.addform.b)
      let value = Number(this.form.b)
      this.submitBtns()
      if (this.form.b == '') return
      this.form.b = value.toFixed(2)
      if (isNaN(this.form.b)) {
        this.form.b = ''
        this.b1 = true
      }
    },
    e(e) {
      this.e1 = false
      this.form.e = this.addform.e
      //获取输入的数据，若不写这行，数据可能输不进去
      this.addform.e = e.target.value
      //将用户输入的数据，自动转换为带千分符的
      this.addform.e = this.fmoney(this.addform.e)
      let value = Number(this.form.e)
      this.submitBtns()
      if (this.addform.e == '') return
      this.form.e = value.toFixed(2)
      if (isNaN(this.form.e)) {
        this.addform.e = ''
        this.e1 = true
      }
    },
    // 限制输入数字
    f() {
      this.f1 = false
      let value = Number(this.form.f)
      this.submitBtns()
      if (this.form.f == '') return
      this.form.f = value.toFixed(0)
      if (isNaN(this.form.f)) {
        this.form.f = ''
        this.f1 = true
      }
    },

    // 产品申请第1步
    async addKJApplys() {
      if (this.submitMessage == '提交中') return
      this.hintVisible = false
      if (!this.btn) return
      if (
        this.btn &&
        this.radio &&
        this.form.a != '' &&
        this.form.b != '' &&
        this.form.c != '' &&
        this.form.d != '' &&
        this.form.e != '' &&
        this.form.f != ''
      ) {
        this.submitMessage = '提交中'
        let token = sessionStorage.getItem('token')
        let formData = new FormData()
        this.typeList.forEach(file => {
          formData.append('file', file.raw)
        })
        let url =
          base +
          `/api/PHYApply/addGCLYBH?projectname=${this.form.a}&expectationamount=${this.form.b}&signday=${this.form.c}&expectationdate=${this.form.d}&conamount=${this.form.e}&expectationdeadline=${this.form.f}&productname=${this.productname}&productid=${this.procedureId}&productcode=${this.productcode}&objecttype=SME007001_CONTRACT&itemname=合同信息`
        this.axios
          .post(url, formData, {
            headers: { 'Content-Type': 'multipart/form-data', 'x-auth': token }
          })
          .then(async res => {
            if (res.data.msg != 'ok') {
              this.$Message.error('提交失败，请检查申请信息')
              this.submitMessage = '提交'
              return
            }
            await updateapplyid(res.data.data.id, this.flowId)
            if (res.data.msg == 'ok') {
              this.$router.push('/cyedApplication3')
              setTimeout(() => {
                this.submitMessage = '提交'
              }, 3000)
            } else {
              this.$Message.error('申请提交失败，请检查数据')
              this.submitMessage = '提交'
            }
          })
      } else {
        this.$Message.error('请填写信息')
      }
    },
    //
    submitBtns() {
      if (
        this.form.a != '' &&
        this.form.b != '' &&
        this.form.c != '' &&
        this.form.d != '' &&
        this.form.e != '' &&
        this.form.f != '' &&
        this.radio
      ) {
        this.btn = true
      } else {
        this.btn = false
      }
    },
    // -------------------------------------------------------
    // 查看
    examine(index, data) {
      let val = data[index]
      let name = data[index].name.split('.')[1]
      let imgUrlStr = val.url
      if (name == 'jpg' || name == 'png') {
        const a = document.createElement('a') // 动态创建a标签，防止下载大文件时，用户没看到下载提示连续点击
        a.setAttribute('target', '_blank')
        a.href = imgUrlStr
        a.click()
      } else {
        fetch(imgUrlStr).then(res =>
          res.blob().then(blob => {
            const a = document.createElement('a'), // 动态创建a标签，防止下载大文件时，用户没看到下载提示连续点击
              url = window.URL.createObjectURL(blob),
              filename = val.name
            a.href = url
            a.download = filename
            a.click()
            window.URL.revokeObjectURL(url)
          })
        )
      }
    },
    //删除表格信息
    del(index, data) {
      data.splice(index, 1)
    },
    // 文件上传
    handlePreview(file) {},
    handleRemove(file, fileList) {
      this.fileList = fileList
    },
    handleChangeBusiness(file, fileList) {
      this.typeList.push(file)
    },
    //自定义上传文件
    uploadFileBusiness(file) {},
    // ------------------------------------------------------
    // 表单格式转换
    // 票面金额
    limitInput(value, name) {
      this.addform[name] =
        ('' + value) // 第一步：转成字符串
          .replace(/[^\d^\.]+/g, '') // 第二步：把不是数字，不是小数点的过滤掉
          .replace(/^0+(\d)/, '$1') // 第三步：第一位0开头，0后面为数字，则过滤掉，取后面的数字
          .replace(/^\./, '0.') // 第四步：如果输入的第一位为小数点，则替换成 0. 实现自动补全
          .match(/^\d*(\.?\d{0,2})/g)[0] || ''
    },
    //千分位格式化：10000转为10,000.00
    fmoney(s, n) {
      if (s == '' || s == null || (s == undefined) | isNaN(Number(s))) {
        return s
      }
      s = Number(s) ? Number(s) : s
      n = (n || n == 0) && n > -1 && n <= 20 ? n : 2
      s = parseFloat((s + '').replace(/[^\d\.-]/g, '')).toFixed(n) + ''
      var l = s.split('.')[0].split('').reverse()
      var r = s.split('.')[1]
      var t = ''
      for (var i = 0; i < l.length; i++) {
        t += l[i] + ((i + 1) % 3 == 0 && i + 1 != l.length ? ',' : '')
      }
      if (n > 0) {
        r = '.' + r
      } else if (n == 0) {
        r = ''
      }
      let returnT = t.split('').reverse().join('') + r
      //负数处理
      if (returnT[0] == '-' && returnT[1] == ',') {
        returnT = '-' + returnT.substring(2)
      }
      return returnT
    },
    //千分位反格式化:10,000.00转为10000.00
    remoney(s) {
      let str = ''
      if (s) {
        str = String(s).replace(/,/g, '')
      }
      if (s && (s + '').indexOf('.') > -1 && Number(str)) {
        return String(s).replace(/[^\d\.-]/g, '')
      } else if (s && Number(str)) {
        return str
      } else {
        return s
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.boxs {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  background-color: #fff;
  .f1 {
    margin-top: 0.1042rem;
    ul {
      display: flex;
      align-items: center;
      li {
        display: flex;
        flex-direction: column;
        height: 0.2083rem;
        .icon {
          .icon1 {
            width: 0.2083rem;
          }
          .icon2 {
            height: 0.0156rem;
            margin: 0 0.0417rem;
          }
        }
        span {
          font-size: 0.0729rem;
          font-family: Source Han Sans SC;
          font-weight: 400;
          color: #999999;
          margin-left: -0.099rem;
          margin-top: 0.0156rem;
        }
      }
    }
  }
  .unit {
    position: relative;
    width: 90%;
    height: 0.1042rem;
    font-size: 0.0833rem;
    font-family: Source Han Sans SC;
    font-weight: 400;
    color: #b3b3b3;
    font-size: 0.0729rem;
    color: #606266;
    p {
      position: absolute;
      @media only screen and (min-width: 1580px) and (max-width: 1950px) {
        right: 15.1%;
      }
      right: 5.5%;
      top: -0.0156rem;
    }
  }
  .f2 {
    margin-top: 5%;
    width: 100%;
    ul {
      display: flex;
      flex-direction: column;
      justify-content: center;

      li {
        position: relative;
        width: 90%;
        margin-bottom: 18px;
        height: 0.2604rem;
        display: flex;
        justify-content: center;
        // .el-form {
        //   width: 500px;
        //   background-color: #fff;
        // }
        .message {
          margin-top: -0.0573rem;
          font-size: 0.0625rem;
          font-family: Source Han Sans SC;
          font-weight: 300;
          color: #ef2d46;
        }
      }
    }
    .title {
      display: flex;
      align-items: center;
      box-sizing: border-box;
      font-size: 0.0938rem;
      font-weight: bold;
      color: #333333;
      margin-bottom: 25px;
      h6 {
        width: 0.026rem;
        height: 0.0938rem;
        background-color: #0a7be0;
        margin-right: 0.0521rem;
      }
      h1 {
        display: flex;
        align-items: center;
        margin-left: 0.0521rem;
        img {
          width: 0.1146rem;
        }
      }
    }
    .f2_contents {
      box-sizing: border-box;
      padding: 0.2083rem 0;
      // 营业执照
      .license1 {
        .aaa11 {
          font-size: 0.0729rem;
          font-weight: 700;
          color: #606266;
          width: 0.677rem;
          text-align: right;
          padding: 0px 0.0729rem;
        }
      }
    }
    // 操作按钮
    .span {
      cursor: pointer;
      display: inline-block;
      font-size: 0.0781rem;
      font-family: Source Han Sans SC;
      font-weight: 400;
      margin-right: 0.026rem;
      color: #0a7be0;
      border-bottom: 1px solid #0a7be0;
      cursor: pointer;
      margin-right: 0.1042rem;
    }
    .span1 {
      margin-right: 0;
      color: #ff4040;
      border-bottom: 1px solid #ff4040;
    }
  }
  .f2::-webkit-scrollbar {
    width: 0.026rem;
    height: 0.0521rem;
    background-color: #fff;
  }

  .f2::-webkit-scrollbar-thumb {
    border-radius: 0.0104rem;
    background: rgba(36, 143, 172, 0.5);
  }
  .f3 {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    bottom: 0.2865rem;
    @media only screen and (min-width: 1580px) and (max-width: 1950px) {
      bottom: 0.3646rem;
    }
    width: 1.4323rem;
    height: 0.1771rem;
    background: #3f6ef2;
    border-radius: 0.0208rem;
    font-size: 0.0938rem;
    font-family: Source Han Sans SC;
    font-weight: 400;
    color: #ffffff;
    cursor: pointer;
  }
  // 服务协议
  .agreement {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 0.1302rem;
    text-align: center;
    margin-top: 0.0521rem;
    user-select: none;
    span {
      font-size: 0.0729rem;
      color: #666;
      margin-left: 0.0365rem;
    }
    img {
      width: 0.0781rem;
      height: 0.0781rem;
      cursor: pointer;
    }
    a {
      cursor: pointer;
      font-size: 0.0729rem;
      color: #738bd0;
    }
  }
  // 按钮组
  .submit {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 0.2604rem;
    margin: 0.026rem 0 0.026rem 0;

    .btn {
      cursor: pointer;
      display: flex;
      justify-content: center;
      align-items: center;
      width: 0.9375rem;
      height: 0.1771rem;
      background: #738bd0;
      border-radius: 0.0208rem;
      font-size: 0.0938rem;
      font-family: Source Han Sans SC;
      font-weight: 400;
      color: #ffffff;
      margin-right: 0.1563rem;
    }
    .btn1 {
      background-color: #bfbfbf;
    }
    // 提交按钮
    .btn3 {
      background-color: #ccc;
      &.active {
        background-color: #3f6ef2;
      }
      &.actives {
        background-color: rgba(10, 123, 224, 0.6);
      }
    }
  }

  .special_top {
    position: absolute;
    @media only screen and (min-width: 0px) and (max-width: 1024px) {
      left: -1.52rem;
    }
    @media only screen and (min-width: 1025px) and (max-width: 1079px) {
      left: -1.5rem;
    }
    @media only screen and (min-width: 1080px) and (max-width: 1167px) {
      left: -1.4rem;
    }
    @media only screen and (min-width: 1168px) and (max-width: 1234px) {
      left: -1.28rem;
    }
    @media only screen and (min-width: 1235px) and (max-width: 1299px) {
      left: -1.21rem;
    }
    @media only screen and (min-width: 1300px) and (max-width: 1420px) {
      left: -1.15rem;
    }
    @media only screen and (min-width: 1420px) and (max-width: 2580px) {
      left: -1.1rem;
    }
    top: -0.0469rem;
    font-size: 0.0885rem;
    color: #1f1f20;
  }
  .special_bottom {
    position: absolute;
    @media only screen and (min-width: 0px) and (max-width: 1024px) {
      left: -1.435rem;
      top: 0.0938rem;
    }
    @media only screen and (min-width: 1025px) and (max-width: 1079px) {
      left: -1.41rem;
      top: 0.0938rem;
    }
    @media only screen and (min-width: 1080px) and (max-width: 1167px) {
      left: -1.32rem;
      top: 0.0938rem;
    }
    @media only screen and (min-width: 1168px) and (max-width: 1234px) {
      left: -1.21rem;
    }
    @media only screen and (min-width: 1235px) and (max-width: 1299px) {
      left: -1.1517rem;
    }
    @media only screen and (min-width: 1300px) and (max-width: 1420px) {
      left: -1.0917rem;
    }
    @media only screen and (min-width: 1420px) and (max-width: 2580px) {
      left: -1.0417rem;
    }

    top: 0.0625rem;
    font-size: 0.0885rem;
    color: #1f1f20;
  }
  // 弹出框
  .dialog-center {
    box-sizing: border-box;
    padding: 0 0.026rem;
    display: flex;
    justify-content: center;
    width: 100%;
    // 小屏
    @media only screen and (min-width: 900px) and (max-width: 1535px) {
      height: 3.05rem;
    }
    // 中屏
    @media only screen and (min-width: 1536px) and (max-width: 1919px) {
      height: 2.8rem;
    }
    // 大屏
    @media only screen and (min-width: 1920px) and (max-width: 2580px) {
      height: 3.4375rem;
    }
    .first {
      display: flex;
      justify-content: center;
      align-items: center;
      // 小屏
      @media only screen and (min-width: 900px) and (max-width: 1535px) {
        min-width: 3.125rem;
        height: 2.3958rem;
      }
      // 中屏
      @media only screen and (min-width: 1536px) and (max-width: 1919px) {
        width: 3.125rem;
        height: 2.3958rem;
      }
      // 大屏
      @media only screen and (min-width: 1920px) and (max-width: 2580px) {
        width: 3.9583rem;
        height: 3.0208rem;
      }

      background-color: #fff;

      h1 {
        font-size: 0.0938rem;
      }
    }
  }
  .dialog-footer {
    display: flex;
    justify-content: space-evenly;
    width: 70%;
    margin: 0 auto;
    .dialog-footer-bnt {
      width: 0.6302rem;
      height: 0.1615rem;
      color: #3f6ef2;
      border: 0.0052rem solid #3f6ef2;
      border-radius: 0.0208rem;
      background-color: #fff;
    }
    .btn2 {
      color: #fff;
      background-color: #3f6ef2;
      &.actives {
        background-color: rgba(10, 123, 224, 0.6);
        border: 0px;
      }
    }
  }
  .abc {
    width: 1.9167rem;
    .el-select {
      width: 100%;
    }
  }
  .dialog-center-hint {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 0.1042rem;
    font-size: 0.0885rem;
  }
}
::v-deep .hint .el-dialog {
  @media only screen and (min-width: 900px) and (max-width: 1535px) {
    width: 52%;
  }
  @media only screen and (min-width: 1536px) and (max-width: 1919px) {
    width: 50%;
  }
  @media only screen and (min-width: 1920px) and (max-width: 2580px) {
    width: 49%;
  }
}
::v-deep .hint .el-dialog__body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.026rem 0.1042rem;
}
// 协议
::v-deep .inviteAffirmClient .el-dialog {
  // 小屏
  @media only screen and (min-width: 900px) and (max-width: 1535px) {
    width: 45%;
    // background-color: #f0f;
  }
  // 中屏
  @media only screen and (min-width: 1536px) and (max-width: 1919px) {
    width: 45%;
    // background-color: #ff0;
  }
  // 大屏
  @media only screen and (min-width: 1920px) and (max-width: 2580px) {
    width: 50%;
    // background-color: #f00;
  }
}
::v-deep .el-dialog__header {
  border: 0;
  padding: 0.026rem 0.1042rem;
}
/* 输入框样式  */
::v-deep .el-input__inner {
  box-sizing: border-box;
  width: 300px;
  @media only screen and (min-width: 1px) and (max-width: 910px) {
    width: 100px;
  }
  @media only screen and (min-width: 911px) and (max-width: 999px) {
    width: 150px;
  }
  @media only screen and (min-width: 1000px) and (max-width: 1150px) {
    width: 200px;
  }
  @media only screen and (min-width: 1151px) and (max-width: 1250px) {
    width: 250px;
  }
  height: 39px;
  font-size: 14px;
  border: 1px solid #e0e0e0;
  border-radius: 0px;
  padding: 10px 10px;
  color: #606266;
  outline: 0;
  line-height: 35px !important;
}
::v-deep .aaaaa .el-icon-date:before {
  content: '';
}
::v-deep .el-form-item__label {
  font-size: 0.0885rem;
  font-weight: 400;
  color: #1f1f20;
}
::v-deep .el-upload-list--picture .el-upload-list__item-name {
  display: none;
}
::v-deep .el-upload-list--picture .el-upload-list__item {
  display: none;
}
::v-deep .el-date-editor.el-input,
.el-date-editor.el-input__inner {
  width: 300px;
  @media only screen and (min-width: 1px) and (max-width: 910px) {
    width: 100px;
  }
  @media only screen and (min-width: 911px) and (max-width: 999px) {
    width: 150px;
  }
  @media only screen and (min-width: 1000px) and (max-width: 1150px) {
    width: 200px;
  }
  @media only screen and (min-width: 1151px) and (max-width: 1250px) {
    width: 250px;
  }
}
</style>
<style lang="scss"></style>
